<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/inc/taglib.inc" %>
<%@ include file="/WEB-INF/inc/script.inc" %>
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<base href="${base}">
    <title>中金通 | 风险测评</title>
    
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.css" rel="stylesheet">
    <!-- FooTable -->
   <!--  <link href="css/plugins/footable/footable.core.css" rel="stylesheet"> -->
    <!-- Data Tables -->
    <link href="css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="css/plugins/dataTables/dataTables.responsive.css" rel="stylesheet">
    <link href="css/plugins/dataTables/dataTables.tableTools.min.css" rel="stylesheet">
    <link href="css/plugins/jsTree/style.min.css" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">

    <link href="css/plugins/datapicker/datepicker3.css" rel="stylesheet">

</head>

<body>

    <div id="wrapper">

    	<!-- 左侧菜单 -->
        <jsp:include page="/WEB-INF/jsp/common/main-menu.jsp"></jsp:include>

        <div id="page-wrapper" class="gray-bg">
        <div class="row border-bottom">
        <!-- 头部工具栏区 -->
        <jsp:include page="/WEB-INF/jsp/common/main-header.jsp"></jsp:include>
        </div>
            <div class="row wrapper border-bottom white-bg page-heading">
                <div class="col-lg-10">
                    <h2>风险测评</h2>
                    <ol class="breadcrumb">
                        <li>
                            <a href="common/platform">Home</a>
                        </li>
                        <li>
                            <a href="investor/list">风险测评</a>
                        </li>
                        <li class="active">
                            <strong> 题库管理</strong>
                        </li>
                    </ol>
                </div>
                <div class="col-lg-2">

                </div>
            </div>

        <div class="row" style="margin-top:10px;">
        <div class="col-md-12">
        	<div class="tabs-container">
	        <ul class="nav nav-tabs">
	            <li >
					<a href="paper/list">
						问卷列表
					</a>
				</li>
				<li>
					<a href="paper/add">
						新增问卷
					</a>
				</li>
				<li class="active">
					<a href="paper/manager">
						 题库管理
					</a>
				</li>
	        </ul>
		<div class="tab-content">
              <div class="tab-pane active">
                  <div class="panel-body">
                      <div class="wrapper wrapper-content animated fadeInRight ecommerce">
	            <div class="row">
	                <div class="col-lg-12">
							 <div class="ibox float-e-margins">
							 	<button type="button" class="btn btn-w-m btn-primary" data-toggle="modal" data-target="#myModal" onclick="BtnAddQuestion();">新增试题</button>
							 	<button type="button" class="btn btn-w-m btn-primary" data-toggle="modal" data-target="#detailModal" id="btn_detail_Modal" style="display:none;">试题详情</button>
								<button type="button" class="btn btn-w-m btn-primary" data-toggle="modal" data-target="#modifyModal" id="btn_modify_Modal" style="display:none;">试题修改</button>		                       
							<div class="ibox-content">
		                            <table id="modelEditable" class="table table-striped table-bordered table-hover">
		                                <thead>
		                                <tr>
		                                    <th style="background-color:white;" class="sorting_disabled">标题</th>
		                                    <th style="background-color:white;">错误答案直接不合格</th>
		                                    <th style="background-color:white;">单选/多选</th>
		                                    <th style="background-color:white;">操作</th>
		                                </tr>
		                                </thead>
		                                <tbody>
		                                </tbody>
		                            </table>
		
		                        </div>
		                    </div>
	                </div>
	            </div>
		  </div>
	     </div>
	    </div>
	   </div>
	  </div>
	</div>
   </div>
        
        <div class="modal inmodal " id="myModal"  tabindex="-1" role="dialog" aria-hidden="true">
            <div class="modal-dialog modal-lg">
                    <div class="modal-content animated fadeIn">
                        <div class="modal-header" >
                            <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
                            </button>
                            <h4 class="modal-title" style="width:1000px;">新增试题</h4>
                         </div>
                      <form method="post" id="addForm" enctype="multipart/form-data" action="" class="form-horizontal">   
	                    <div class="modal-body">
			                 <div class="row">
			                    <div class="col-sm-12">
			                        <div class="form-group">
			                            <label class="control-label" for="date_added">标题:</label>
			                            	<input type="text" id="title" name="title" value="" placeholder="标题" class="form-control">
			                        </div>
			                    </div>
			                </div>
			                <div class="row">
			                    <div class="col-sm-12">
			                        <div class="form-group">
			                            <label class="control-label" for="date_added">选项:</label>
			                            	<div class="ibox-content">
					                            <table id="optionEditable"  class="table table-striped table-bordered table-hover myTable">
					                                <thead>
						                                <tr>
						                                    <th style="background-color:white;" class="sorting_disabled">次序</th>
						                                    <th style="background-color:white;">选项</th>
						                                    <th style="background-color:white;">评分</th>
						                                    <th style="background-color:white;">直接不合格选项</th>
						                                    <th style="background-color:white;">操作</th>
						                                </tr>
					                                </thead>
					                                <tbody id="optionBody">
					                                	<tr role="row" class="odd">
					                                		<td> <center>A</center></td>
					                                		<td>
					                                			<textarea style="resize:none;width:430px;" id="order_id"   value="" placeholder="选项" class="form-control"></textarea>
					                                		</td>
					                                		<td>
													           <select class="form-control m-b" name="groupId" id="groupId">
										                            <option selected value="0">0</option>
										                            <option value="5">5</option>
										                            <option value="10">10</option>
										                            <option value="15">15</option>
										                            <option value="20">20</option>
								                            	</select>
								                            </td>
					                                		<td>
					                                			<select class="form-control m-b" name="groupId" id="groupId">
					                                				<option selected value="否">否</option>
										                            <option value="是">是</option>
								                            	</select>
					                                		</td>
					                                		<td>
					                                			<button type="button" onclick="delete_this_row(this)"; class="btn btn-primary">删除</button>
					                                		</td>
					                                	</tr>
					                                </tbody>
					                            </table>
					                            <div>
						                            <button type="button" id="btn_add_option" class="btn btn-primary">增加选项</button>
						                            <label id="myerror"  style="color:#cc5965;display:none;">所有选项内容都不能为空</label>
					                            </div>
					                        </div>
			                        </div>
			                    </div>
			                </div>
			                <div class="row">
			                    <div class="col-sm-12">
			                        <div class="form-group">
			                            <label class="control-label" for="date_added">是否多选:</label>
			                            	<input type="checkbox" id="MultiChoice">
			                        </div>
			                    </div>
			                </div>
		                    <div class="modal-footer">
		                        <button type="button" class="btn btn-white" id="dsimiss_add_relation" data-dismiss="modal">取消</button>
		                        <button type="submit" id="btn_add_option" class="btn btn-primary" >确定</button>
		                    </div>
	              		</div>
	              	  </form>	
              		</div>	
         	</div>
        </div>
        
        
         <div class="modal inmodal " id="modifyModal"  tabindex="-1" role="dialog" aria-hidden="true">
            <div class="modal-dialog modal-lg">
                    <div class="modal-content animated fadeIn">
                        <div class="modal-header" >
                            <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
                            </button>
                            <h4 class="modal-title" style="width:1000px;">试题修改</h4>
                         </div>
                      <form method="post" id="modifyForm" enctype="multipart/form-data" action="" class="form-horizontal">   
	                    <div class="modal-body">
			                 <div class="row">
			                    <div class="col-sm-12">
			                        <div class="form-group">
			                            <label class="control-label" for="date_added">标题:</label>
			                            	<input type="text" id="modity_title" name="title" value="" placeholder="标题" class="form-control">
			                            	<input type="text" style="display:none;" id="question_id" name="oldPath" value="">
			                        </div>
			                    </div>
			                </div>
			                <div class="row">
			                    <div class="col-sm-12">
			                        <div class="form-group">
			                            <label class="control-label" for="date_added">选项:</label>
			                            	<div class="ibox-content">
					                            <table id="modifyEditable"  class="table table-striped table-bordered table-hover myTable">
					                                <thead>
						                                <tr>
						                                    <th style="background-color:white;" class="sorting_disabled">次序</th>
						                                    <th style="background-color:white;">选项</th>
						                                    <th style="background-color:white;">评分</th>
						                                    <th style="background-color:white;">直接不合格选项</th>
						                                    <th style="background-color:white;">操作</th>
						                                </tr>
					                                </thead>
					                                <tbody>
					                                
					                                </tbody>
					                            </table>
					                            <div>
						                            <button type="button" id="btn_add_modify_option" class="btn btn-primary">增加选项</button>
						                            <label id="modifyerror"  style="color:#cc5965;display:none;">所有选项内容都不能为空</label>
					                            </div>
					                        </div>
			                        </div>
			                    </div>
			                </div>
			                <div class="row">
			                    <div class="col-sm-12">
			                        <div class="form-group">
			                            <label class="control-label" for="date_added">是否多选:</label>
			                            	<input type="checkbox" id="modify_isMultChoice">
			                        </div>
			                    </div>
			                </div>
		                    <div class="modal-footer">
		                        <button type="button" class="btn btn-white" id="dsimiss_modify_relation" data-dismiss="modal">取消</button>
		                        <button type="submit" id="btn_modify_option" class="btn btn-primary" >保存</button>
		                    </div>
	              		</div>
	              	  </form>	
              		</div>	
         	</div>
        </div>
        
         <div class="modal inmodal " id="detailModal"  tabindex="-1" role="dialog" aria-hidden="true">
            <div class="modal-dialog modal-lg">
                    <div class="modal-content animated fadeIn">
                        <div class="modal-header" >
                            <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
                            </button>
                            <h4 class="modal-title" style="width:1000px;">试题详情</h4>
                         </div>
                      <form method="post" id="modifyForm" enctype="multipart/form-data" action="" class="form-horizontal">   
	                    <div class="modal-body">
			                 <div class="row">
			                    <div class="col-sm-12">
			                        <div class="form-group">
			                            <label class="control-label" for="date_added">标题:</label>
			                            	<span id="detail_title" style="font-size: 13px;font-color:#787B7D;font-weight:bold;"></span>
			                        </div>
			                    </div>
			                </div>
			                <div class="row">
			                    <div class="col-sm-12">
			                        <div class="form-group">
			                            <label class="control-label" for="date_added">选项:</label>
			                            	<div class="ibox-content">
					                            <table id="detail_options_table"  class="table table-striped table-bordered table-hover myTable">
					                                <thead>
						                                <tr>
						                                    <th style="background-color:white;font-size:14px;" class="sorting_disabled">次序</th>
						                                    <th style="background-color:white;font-size:14px;">选项</th>
						                                    <th style="background-color:white;font-size:14px;">评分</th>
						                                    <th style="background-color:white;font-size:14px;">直接不合格选项</th>
						                                </tr>
					                                </thead>
					                                <tbody id="detail_option_body" style="font-size:13px;"></tbody>
					                            </table>
					                        </div>
			                        </div>
			                    </div>
			                </div>
			                <div class="row">
			                    <div class="col-sm-12">
			                        <div class="form-group">
			                            <label class="control-label" for="date_added">是否多选:</label>
			                            	<span id="detail_isMultChoice" style="font-size: 13px;font-color:#787B7D;font-weight:bold;">1</span>
			                        </div>
			                    </div>
			                </div>
		                    <div class="modal-footer">
		                        <button type="button" class="btn btn-primary" id="dsimiss_add_relation" data-dismiss="modal">确定</button>
		                    </div>
	              		</div>
	              	  </form>	
              		</div>	
         	</div>
        </div>
        <!-- 底部版权 -->
        <jsp:include page="/WEB-INF/jsp/common/main-footer.jsp"></jsp:include>
        </div>
        </div>

    <!-- Mainly scripts -->
   
    <script src="js/jquery-2.1.1.js"></script>
    <script src="js/plugins/validate/jquery.validate.min.js"></script>
    <script src="js/plugins/jeditable/jquery.jeditable.js"></script>
	<script src="js/jquery.serialize-object.min.js" type="text/javascript"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="js/plugins/datapicker/bootstrap-datepicker.js"></script>

    <!-- Custom and plugin javascript -->
    <script src="js/inspinia.js"></script>
    <script src="js/plugins/pace/pace.min.js"></script>
	<script src="js/plugins/bootbox/bootbox.min.js" type="text/javascript"></script>
    
    <!-- Data picker -->
    <script src="js/plugins/datapicker/bootstrap-datepicker.js"></script>
    
    <!-- Data Tables -->
    <script src="js/plugins/dataTables/jquery.dataTables.min.js"></script>
    <script src="js/plugins/dataTables/dataTables.bootstrap.js"></script>
    <script src="js/plugins/dataTables/dataTables.responsive.js"></script>
    <script src="js/plugins/dataTables/dataTables.tableTools.min.js"></script>
     <!-- 业务js -->
    <script src="js/plugins/jsTree/jstree.min.js"></script>
    <script src="js/riskEvaluation/manager.js?v=${jsVersion}"></script>
    <script src="js/investor/utils.js?v=${jsVersion}"></script>
	<!-- FooTable -->
    <!-- Page-Level Scripts -->
    <script>
    	OptionAdd.init();
    	OptionModify.init();
    	PaperModule.init();
    </script>

</body>

</html>
